package com.zhxy.mapper;

import com.zhxy.bean.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据用户名查询登录用户
     * @param username
     * @return
     */
    User loginByUsername(String username);

    /**
     * 用户分页查询
     * @return
     */
    List<User> selectUserPage();

}